<template>
  <el-dialog
    v-model="props.showValue"
    :title="props.title"
    :before-close="handleClose"
  >
    <slot></slot>
  </el-dialog>
</template>

<script lang="ts" setup>
import { ref } from "vue"
const props = defineProps({
  showValue: {
    type: Boolean,
    default: false
  },
  title: {
    type: String,
    require: true
  }
})
const emit = defineEmits<{
  (e: "update:showValue", bool)
}>()
const handleClose = (done: () => void) => {
  emit("update:showValue", false)
}
</script>

<style lang="scss" scoped></style>
